package org.myspring.dis.ano;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

public class HelloWorld {

	private String name;

	public String getName() {
		System.out.println("Your name:" + name);
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public HelloWorld() {
		System.out.println("initialize ...");
	}

	@Override
	public String toString() {
		return super.toString() + " name=" + getName();
	}

	@PostConstruct
	public void init() {
		System.out.println("Bean is going through init.");
	}

	@PreDestroy
	public void destroy() {
		System.out.println("Bean will destroy now.");
	}
}
